<?php
$connect = mysql_connect('localhost','root','');
mysql_select_db("ajaxadmintool");
error_reporting(E_ALL ^ E_NOTICE);
session_start();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>
<?php
$id = $_POST['id'];
print_r($id);
$update = "UPDATE adminform SET addusername='$addusername',addpassword='$addpassword' WHERE adminid='$id'";
$updatevalue = mysql_query($update);
header("Location: user_list.php");
?>

<?php
}
else
{
header("Location: login.php");
}
?>